package emailBox

import (
	"github.com/flipped-aurora/gin-vue-admin/server/api/v1"
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type EmailConfigRouter struct {
}

// InitEmailConfigRouter 初始化 EmailConfig 路由信息
func (s *EmailConfigRouter) InitEmailConfigRouter(Router *gin.RouterGroup) {
	emailConfigRouter := Router.Group("emailConfig").Use(middleware.OperationRecord())
	emailConfigRouterWithoutRecord := Router.Group("emailConfig")
	var emailConfigApi = v1.ApiGroupApp.EmailboxApiGroup.EmailConfigApi
	{
		emailConfigRouter.POST("createEmailConfig", emailConfigApi.CreateEmailConfig)   // 新建EmailConfig
		emailConfigRouter.DELETE("deleteEmailConfig", emailConfigApi.DeleteEmailConfig) // 删除EmailConfig
		emailConfigRouter.DELETE("deleteEmailConfigByIds", emailConfigApi.DeleteEmailConfigByIds) // 批量删除EmailConfig
		emailConfigRouter.PUT("updateEmailConfig", emailConfigApi.UpdateEmailConfig)    // 更新EmailConfig
	}
	{
		emailConfigRouterWithoutRecord.GET("findEmailConfig", emailConfigApi.FindEmailConfig)        // 根据ID获取EmailConfig
		emailConfigRouterWithoutRecord.GET("getEmailConfigList", emailConfigApi.GetEmailConfigList)  // 获取EmailConfig列表
	}
}
